Escrow detail page #57
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
β¨ Build Escrow Detail Page
Closes #13
π§© Overview
This PR introduces a comprehensive Escrow Detail Page that gives users full visibility into an individual escrow agreement and serves as the central place for escrow-related actions.
The page improves transparency, trust, and usability by clearly displaying escrow terms, participant statuses, transaction history, and a real-time timeline of events β all in a responsive, user-friendly layout.
π© Problem Statement
Before this change:
β No dedicated view for individual escrow agreements
β Users could not see counterparty roles or confirmation status
β Escrow timelines and on-chain transaction history were hidden
β Actions like confirm, dispute, or release lacked proper context
This made it difficult for users to make informed decisions and reduced confidence in the escrow process.
π― Solution
A new Escrow Detail Page available at:
/escrow/[id]
This page provides a complete, structured view of an escrow agreement and dynamically adapts based on user role and escrow state.
π§± Page Structure & Features
π§Ύ Header Section
Escrow title / identifier
Status badge (Pending, Funded, Released, Disputed, etc.)
Quick action buttons (role-aware)
π₯ Parties Section
Escrow participantsβ wallet addresses
Clearly defined roles (Initiator, Counterparty)
Confirmation status indicators per party
π Terms Section
Escrow amount (properly formatted)
Conditions / description
Deadline with real-time countdown timer
π Timeline Section
Chronological display of escrow events:
Creation
Deposits
Confirmations
Disputes
Releases
π Transaction History
List of on-chain transactions
Direct links to the Stellar Explorer
External links open in new tabs
β‘ Conditional Actions
Action buttons rendered dynamically based on:
Current user role
Escrow state
Includes:
β Confirm
π Release
π Additional UX Enhancements
π Share / copy escrow link (clipboard support)
π± Fully mobile-responsive layout
π« 404 handling for invalid or non-existent escrow IDs
β³ Loading and error states
π οΈ Implementation Details
π New Page
src/app/escrow/[id]/page.tsx
π§© Components
src/components/escrow/detail/
βββ EscrowHeader.tsx
βββ PartiesSection.tsx
βββ TermsSection.tsx
βββ TimelineSection.tsx
βββ TransactionHistory.tsx
π Action Components
ConfirmButton
DisputeButton
ReleaseButton
π Hooks & Utilities
useEscrow.ts for data fetching
Deadline countdown component
Clipboard-based share utility
π§ͺ Testing & Validation
The following scenarios were tested and verified:
β Correct escrow loads by ID
π« Invalid escrow ID returns a 404 page
π Action buttons show/hide based on role and state
π Timeline renders events in correct chronological order
π Transaction links open Stellar Explorer correctly
β± Countdown timer updates in real time
π Share button copies escrow URL to clipboard
π± Responsive behavior on mobile screens
Closes #13